Builder

class Builder : GeneratedMessage.Builder<BuilderT> , MeshProtos.MeshPacketOrBuilder

A packet envelope sent/received over the mesh
only payload_variant is sent in the payload portion of the LORA packet.
The other fields are either not sent at all, or sent in the special 16 byte LORA header.
Protobuf type meshtastic.MeshPacket

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

(Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on.
If unset, packet was on the primary channel.
A particular node might know only a subset of channels in use on the mesh.
Therefore channel_index is inherently a local concept and meaningless to send between nodes.
Very briefly, while sending and receiving deep inside the device Router code, this field instead
contains the 'channel hash' instead of the index.
This 'trick' is only used while the payload_variant is an 'encrypted'.
uint32 channel = 3;
Link copied to clipboard

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard

Describe if this message is delayed
.meshtastic.MeshPacket.Delayed delayed = 13 [deprecated = true];
Link copied to clipboard

TODO: REPLACE
bytes encrypted = 5;
Link copied to clipboard

The sending node number.
Note: Our crypto implementation uses this field as well.
See [crypto](/docs/overview/encryption) for details.
fixed32 from = 1;
Link copied to clipboard

If unset treated as zero (no forwarding, send to direct neighbor nodes only)
if 1, allow hopping through one node, etc...
For our usecase real world topologies probably have a max of about 3.
This field is normally placed into a few of bits in the header.
uint32 hop_limit = 9;
Link copied to clipboard

Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled.
uint32 hop_start = 15;
Link copied to clipboard

A unique ID for this packet.
Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space).
Otherwise a unique ID for this packet, useful for flooding algorithms.
ID only needs to be unique on a _per sender_ basis, and it only
needs to be unique for a few minutes (long enough to last for the length of
any ACK or the completion of a mesh broadcast flood).
Note: Our crypto implementation uses this id as well.
See [crypto](/docs/overview/encryption) for details.
fixed32 id = 6;
Link copied to clipboard

Last byte of the node number of the node that should be used as the next hop in routing.
Set by the firmware internally, clients are not supposed to set this.
uint32 next_hop = 18;
Link copied to clipboard

Indicates whether the packet was en/decrypted using PKI
bool pki_encrypted = 17;
Link copied to clipboard

The priority of this message for sending.
See MeshPacket.Priority description for more details.
.meshtastic.MeshPacket.Priority priority = 11;
Link copied to clipboard

Records the public key the packet was encrypted with, if applicable.
bytes public_key = 16;
Link copied to clipboard

Last byte of the node number of the node that will relay/relayed this packet.
Set by the firmware internally, clients are not supposed to set this.
uint32 relay_node = 19;
Link copied to clipboard

rssi of received packet. Only sent to phone for dispay purposes.
int32 rx_rssi = 12;
Link copied to clipboard

*Never* sent over the radio links.
Set during reception to indicate the SNR of this packet.
Used to collect statistics on current link quality.
float rx_snr = 8;
Link copied to clipboard

The time this message was received by the esp32 (secs since 1970).
Note: this field is _never_ sent on the radio link itself (to save space) Times
are typically not sent over the mesh, but they will be added to any Packet
(chain of SubPacket) sent to the phone (so the phone can know exact time of reception)
fixed32 rx_time = 7;
Link copied to clipboard

The (immediate) destination for this packet
fixed32 to = 2;
Link copied to clipboard

Indicates which transport mechanism this packet arrived over
.meshtastic.MeshPacket.TransportMechanism transport_mechanism = 21;
Link copied to clipboard

*Never* sent over the radio links.
Timestamp after which this packet may be sent.
Set by the firmware internally, clients are not supposed to set this.
uint32 tx_after = 20;
Link copied to clipboard

Describes whether this packet passed via MQTT somewhere along the path it currently took.
bool via_mqtt = 14;
Link copied to clipboard

This packet is being sent as a reliable message, we would prefer it to arrive at the destination.
We would like to receive a ack packet in response.
Broadcasts messages treat this flag specially: Since acks for broadcasts would
rapidly flood the channel, the normal ack behavior is suppressed.
Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm).
If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message.
So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender.
If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.
Note: This flag is normally sent in a flag bit in the header when sent over the wire
bool want_ack = 10;
Link copied to clipboard
open fun getChannel(): Int

(Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on.
If unset, packet was on the primary channel.
A particular node might know only a subset of channels in use on the mesh.
Therefore channel_index is inherently a local concept and meaningless to send between nodes.
Very briefly, while sending and receiving deep inside the device Router code, this field instead
contains the 'channel hash' instead of the index.
This 'trick' is only used while the payload_variant is an 'encrypted'.
uint32 channel = 3;
Link copied to clipboard

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard

Describe if this message is delayed
.meshtastic.MeshPacket.Delayed delayed = 13 [deprecated = true];
Link copied to clipboard
open fun getDelayedValue(): Int

Describe if this message is delayed
.meshtastic.MeshPacket.Delayed delayed = 13 [deprecated = true];
Link copied to clipboard
fun getDescriptor(): Descriptors.Descriptor
Link copied to clipboard
open fun getDescriptorForType(): Descriptors.Descriptor
Link copied to clipboard
open fun getEncrypted(): ByteString

TODO: REPLACE
bytes encrypted = 5;
Link copied to clipboard
open fun getFrom(): Int

The sending node number.
Note: Our crypto implementation uses this field as well.
See [crypto](/docs/overview/encryption) for details.
fixed32 from = 1;
Link copied to clipboard
open fun getHopLimit(): Int

If unset treated as zero (no forwarding, send to direct neighbor nodes only)
if 1, allow hopping through one node, etc...
For our usecase real world topologies probably have a max of about 3.
This field is normally placed into a few of bits in the header.
uint32 hop_limit = 9;
Link copied to clipboard
open fun getHopStart(): Int

Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled.
uint32 hop_start = 15;
Link copied to clipboard
open fun getId(): Int

A unique ID for this packet.
Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space).
Otherwise a unique ID for this packet, useful for flooding algorithms.
ID only needs to be unique on a _per sender_ basis, and it only
needs to be unique for a few minutes (long enough to last for the length of
any ACK or the completion of a mesh broadcast flood).
Note: Our crypto implementation uses this id as well.
See [crypto](/docs/overview/encryption) for details.
fixed32 id = 6;
Link copied to clipboard
open fun getNextHop(): Int

Last byte of the node number of the node that should be used as the next hop in routing.
Set by the firmware internally, clients are not supposed to set this.
uint32 next_hop = 18;
Link copied to clipboard

Indicates whether the packet was en/decrypted using PKI
bool pki_encrypted = 17;
Link copied to clipboard

The priority of this message for sending.
See MeshPacket.Priority description for more details.
.meshtastic.MeshPacket.Priority priority = 11;
Link copied to clipboard
open fun getPriorityValue(): Int

The priority of this message for sending.
See MeshPacket.Priority description for more details.
.meshtastic.MeshPacket.Priority priority = 11;
Link copied to clipboard
open fun getPublicKey(): ByteString

Records the public key the packet was encrypted with, if applicable.
bytes public_key = 16;
Link copied to clipboard
open fun getRelayNode(): Int

Last byte of the node number of the node that will relay/relayed this packet.
Set by the firmware internally, clients are not supposed to set this.
uint32 relay_node = 19;
Link copied to clipboard
open fun getRxRssi(): Int

rssi of received packet. Only sent to phone for dispay purposes.
int32 rx_rssi = 12;
Link copied to clipboard
open fun getRxSnr(): Float

*Never* sent over the radio links.
Set during reception to indicate the SNR of this packet.
Used to collect statistics on current link quality.
float rx_snr = 8;
Link copied to clipboard
open fun getRxTime(): Int

The time this message was received by the esp32 (secs since 1970).
Note: this field is _never_ sent on the radio link itself (to save space) Times
are typically not sent over the mesh, but they will be added to any Packet
(chain of SubPacket) sent to the phone (so the phone can know exact time of reception)
fixed32 rx_time = 7;
Link copied to clipboard
open fun getTo(): Int

The (immediate) destination for this packet
fixed32 to = 2;
Link copied to clipboard

Indicates which transport mechanism this packet arrived over
.meshtastic.MeshPacket.TransportMechanism transport_mechanism = 21;
Link copied to clipboard

Indicates which transport mechanism this packet arrived over
.meshtastic.MeshPacket.TransportMechanism transport_mechanism = 21;
Link copied to clipboard
open fun getTxAfter(): Int

*Never* sent over the radio links.
Timestamp after which this packet may be sent.
Set by the firmware internally, clients are not supposed to set this.
uint32 tx_after = 20;
Link copied to clipboard
open fun getViaMqtt(): Boolean

Describes whether this packet passed via MQTT somewhere along the path it currently took.
bool via_mqtt = 14;
Link copied to clipboard
open fun getWantAck(): Boolean

This packet is being sent as a reliable message, we would prefer it to arrive at the destination.
We would like to receive a ack packet in response.
Broadcasts messages treat this flag specially: Since acks for broadcasts would
rapidly flood the channel, the normal ack behavior is suppressed.
Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm).
If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message.
So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender.
If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.
Note: This flag is normally sent in a flag bit in the header when sent over the wire
bool want_ack = 10;
Link copied to clipboard
open fun hasDecoded(): Boolean

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard
open fun hasEncrypted(): Boolean

TODO: REPLACE
bytes encrypted = 5;
Link copied to clipboard
Link copied to clipboard

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard
open fun mergeFrom(other: Message): MeshProtos.MeshPacket.Builder
open fun mergeFrom(input: CodedInputStream, extensionRegistry: ExtensionRegistryLite): MeshProtos.MeshPacket.Builder
Link copied to clipboard

(Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on.
If unset, packet was on the primary channel.
A particular node might know only a subset of channels in use on the mesh.
Therefore channel_index is inherently a local concept and meaningless to send between nodes.
Very briefly, while sending and receiving deep inside the device Router code, this field instead
contains the 'channel hash' instead of the index.
This 'trick' is only used while the payload_variant is an 'encrypted'.
uint32 channel = 3;
Link copied to clipboard

TODO: REPLACE
.meshtastic.Data decoded = 4;
Link copied to clipboard

Describe if this message is delayed
.meshtastic.MeshPacket.Delayed delayed = 13 [deprecated = true];
Link copied to clipboard

Describe if this message is delayed
.meshtastic.MeshPacket.Delayed delayed = 13 [deprecated = true];
Link copied to clipboard
open fun setEncrypted(value: ByteString): MeshProtos.MeshPacket.Builder

TODO: REPLACE
bytes encrypted = 5;
Link copied to clipboard

The sending node number.
Note: Our crypto implementation uses this field as well.
See [crypto](/docs/overview/encryption) for details.
fixed32 from = 1;
Link copied to clipboard

If unset treated as zero (no forwarding, send to direct neighbor nodes only)
if 1, allow hopping through one node, etc...
For our usecase real world topologies probably have a max of about 3.
This field is normally placed into a few of bits in the header.
uint32 hop_limit = 9;
Link copied to clipboard

Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled.
uint32 hop_start = 15;
Link copied to clipboard

A unique ID for this packet.
Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space).
Otherwise a unique ID for this packet, useful for flooding algorithms.
ID only needs to be unique on a _per sender_ basis, and it only
needs to be unique for a few minutes (long enough to last for the length of
any ACK or the completion of a mesh broadcast flood).
Note: Our crypto implementation uses this id as well.
See [crypto](/docs/overview/encryption) for details.
fixed32 id = 6;
Link copied to clipboard

Last byte of the node number of the node that should be used as the next hop in routing.
Set by the firmware internally, clients are not supposed to set this.
uint32 next_hop = 18;
Link copied to clipboard

Indicates whether the packet was en/decrypted using PKI
bool pki_encrypted = 17;
Link copied to clipboard

The priority of this message for sending.
See MeshPacket.Priority description for more details.
.meshtastic.MeshPacket.Priority priority = 11;
Link copied to clipboard

The priority of this message for sending.
See MeshPacket.Priority description for more details.
.meshtastic.MeshPacket.Priority priority = 11;
Link copied to clipboard
open fun setPublicKey(value: ByteString): MeshProtos.MeshPacket.Builder

Records the public key the packet was encrypted with, if applicable.
bytes public_key = 16;
Link copied to clipboard

Last byte of the node number of the node that will relay/relayed this packet.
Set by the firmware internally, clients are not supposed to set this.
uint32 relay_node = 19;
Link copied to clipboard

rssi of received packet. Only sent to phone for dispay purposes.
int32 rx_rssi = 12;
Link copied to clipboard

*Never* sent over the radio links.
Set during reception to indicate the SNR of this packet.
Used to collect statistics on current link quality.
float rx_snr = 8;
Link copied to clipboard

The time this message was received by the esp32 (secs since 1970).
Note: this field is _never_ sent on the radio link itself (to save space) Times
are typically not sent over the mesh, but they will be added to any Packet
(chain of SubPacket) sent to the phone (so the phone can know exact time of reception)
fixed32 rx_time = 7;
Link copied to clipboard

The (immediate) destination for this packet
fixed32 to = 2;
Link copied to clipboard

Indicates which transport mechanism this packet arrived over
.meshtastic.MeshPacket.TransportMechanism transport_mechanism = 21;
Link copied to clipboard

Indicates which transport mechanism this packet arrived over
.meshtastic.MeshPacket.TransportMechanism transport_mechanism = 21;
Link copied to clipboard

*Never* sent over the radio links.
Timestamp after which this packet may be sent.
Set by the firmware internally, clients are not supposed to set this.
uint32 tx_after = 20;
Link copied to clipboard

Describes whether this packet passed via MQTT somewhere along the path it currently took.
bool via_mqtt = 14;
Link copied to clipboard

This packet is being sent as a reliable message, we would prefer it to arrive at the destination.
We would like to receive a ack packet in response.
Broadcasts messages treat this flag specially: Since acks for broadcasts would
rapidly flood the channel, the normal ack behavior is suppressed.
Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm).
If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message.
So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender.
If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.
Note: This flag is normally sent in a flag bit in the header when sent over the wire
bool want_ack = 10;